<?php 
class Email
{
    public function send($toNome,$toEmail,$subject,$message){
		try{
			// To send HTML mail, the Content-type header must be set
			$headers  = "MIME-Version: 1.0" . "\r\n";
			$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
			// Additional headers
			$headers .= "From: PosIE Unicamp <posieunicamp@gmail.com>" . "\r\n";
			$headers .= "To: $toNome <$toEmail>" . "\r\n";
			
			$success = mail ($toEmail,$subject,$message,$headers);
		    return $success;
		    	
	    }catch (Exception $e){
	    	return false;	
	    }
		
	}	
}



?>